package com.wwtech.epp.ui.activity.work.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.work.PunchCardActivity;
import com.wwtech.epp.ui.activity.work.contract.PunchCardContract;
import com.wwtech.epp.ui.activity.work.presenter.PunchCardPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: The moduele of PunchCardActivity, provide field for PunchCardActivity
 * @date 2017/08/28 16:45:05
 */
@Module
public class PunchCardModule {
    private final PunchCardContract.View mView;


    public PunchCardModule(PunchCardContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public PunchCardPresenter providePunchCardPresenter(HttpAPIWrapper httpAPIWrapper, PunchCardActivity mActivity) {
        return new PunchCardPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public PunchCardActivity providePunchCardActivity() {
        return (PunchCardActivity) mView;
    }
}